<html>
    <body>
        <?php
        if (isset($_POST['submit']) && $_POST['submit']) {
            if ($_POST['vlook'] != 'aethv666') {
                die('bye bye ku');
            } else {
                $allowedExts = array("doc", "docx", "txt", "ae");
                $temp = explode(".", $_FILES["file"]["name"]);
                $extension = end($temp);
                echo 'type: ' . $_FILES["file"]["type"];


                if ($_FILES["file"]["error"] > 0) {
                    echo "Return Code: " . $_FILES["file"]["error"] . "<br>";
                } else {
                    echo "Upload: " . $_FILES["file"]["name"] . "<br>";
                    echo "Type: " . $_FILES["file"]["type"] . "<br>";
                    echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>";
                    echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br>";

                    if (file_exists("upload/" . $_FILES["file"]["name"])) {
                        echo $_FILES["file"]["name"] . " already exists. ";
                    } else {
                        move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $_FILES["file"]["name"]);
                        echo "Stored in: " . "upload/" . $_FILES["file"]["name"];
                    }
                }
            }
        }
        ?>
        <form action="s3cret.php" method="post" enctype="multipart/form-data">

            <label for="file">Filename:</label>
            <input type="file" name="file" id="file"><br>

            <label for="vlook">s3cret:</label>
            <input type="text" name="vlook" id="vlook"><br>

            <input type="submit" name="submit" value="Submit">
        </form>

    </body>
</html>